import request from '@/utils/request'

//商店管理
const STORE_URL = 'api/admin/store'

//添加商店
export const addStore = (store) =>{
    return request.post(STORE_URL,store)
}

//编辑商店信息
export const updateStore = (store) =>{
    return request.put(STORE_URL,store)
}

//查询店铺
export const queryById = (id) =>{
    return request.get(STORE_URL+'/'+id)
}

//查询所有店铺
export const storePage = (name,page,pageSize) =>{
    return request.get(STORE_URL+'/page',{
        params:{
            name:name,
            page:page,
            pageSize:pageSize
        }
    })
}